import http from '../utils/http/http'

//获取分类列表
export const getCategoryList = (params)=>{
    return http.get('/competition/getCategory',params)
}

//上传封面
export const uploadCover = (params)=>{
    return http.post('/upload/uploadCover',params)
}

//上传附件
export const uploadAccessory = (params)=>{
    return http.post('/upload/uploadAccessory',params)
}

//发布竞赛
export const publishCompetition = (params)=>{
    return http.post('/publish/competition',params)
}

//获取竞赛列表
export const getCompetitionList = (params)=>{
    return http.get('/competitionManage/getCompetitionList',params)
}

//搜索竞赛
export const searchCompetition = (params)=>{
    return http.get('/competitionManage/searchCompetition',params)
}

//删除竞赛
export const deleteCompetition = (params)=>{
    return http.post('/competitionManage/deleteCompetition',params)
}

//修改竞赛
export const upadteCompetition = (params)=>{
    return http.post('/competitionManage/upadteCompetition',params)
}

//搜索制定竞赛的用户
export const searchUser = (params)=>{
    return http.post('/competitionManage/searchUser',params)
}

//导出文件
export const exportFile = (params)=>{
    return http.post('/competitionManage/exportFile',params)
}

//取消报名
export const cancelEntry = (params)=>{
    return http.post('/competitionManage/cancelEntry',params)
}

//按浏览量获取竞赛信息
export const getSortByVisits = (params)=>{
    return http.get('/competitionManage/getSortByVisits',params)
}